<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">

<section class="content-header">
    <h1>提报计划明细查询</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" onsubmit="return false;">
                        <div class="row">
                            <div class="form-inline">
                                <input name="branchName" th:value="${branchName}" type="hidden">
                                <div class="form-group">
                                    <label for="query-proCode">项目编号</label>
                                    <input id="query-proCode" type="text" name="proCode" class="form-control"
                                           placeholder="请输入项目编号">
                                </div>
                                <div class="form-group">
                                    <label for="query-proName">项目名称</label>
                                    <input id="query-proName" type="text" name="proName" class="form-control"
                                           placeholder="请输入项目名称">
                                </div>
                                <div class="form-group">
                                    <label for="query-malType">类型</label>
                                    <select id="query-malType" class="form-control" name="special">
                                        <option value="" selected>请选择</option>
                                        <option th:each="type : ${specials}" th:value="${type.name}"
                                                th:text="${type.name}">>
                                        </option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="query-part">部分</label>
                                    <input id="query-part" type="text" name="part" class="form-control"
                                           placeholder="请输入部分">
                                </div>
                                <div class="form-group">
                                    <label for="query-malDesc">物料描述</label>
                                    <input id="query-malDesc" type="text" name="malDesc" class="form-control"
                                           placeholder="请输入物料描述">
                                </div>
                                <div class="form-group">
                                    <label for="query-standard">型号/标准号</label>
                                    <input id="query-standard" type="text" name="standard" class="form-control"
                                           placeholder="请输入型号/标准号">
                                </div>
                                <div class="form-group">
                                    <label for="query-remark">备注</label>
                                    <input id="query-remark" type="text" name="remark" class="form-control"
                                           placeholder="请输入备注">
                                </div>
                                <div class="form-group">
                                    <label for="query-postName">提报人</label>
                                    <input id="query-postName" type="text" name="postName" class="form-control"
                                           placeholder="请输入提报人">
                                </div>
                                <div class="form-group">
                                    <label for="query-startTime">日期</label>
                                    <input id="query-startTime" type="text" class="form-control datepicker"
                                           name="startTime"
                                           readonly="readonly"/>
                                    <label for="query-endTime"> 至 </label>
                                    <input id="query-endTime" type="text" class="form-control datepicker" name="endTime"
                                           readonly="readonly"/>
                                </div>
                                <button type="button" class="btn btn-success" id="btn-search"
                                        onclick="js.table.search(table)">
                                    <span class="Bold">搜索</span>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">

    let table;

    $(function () {

        /** 加载列表 */
        table = js.table.init({
            url: ctx + "report/query/detailList",
            showExport: true,
            columns: [
                {
                    title: '序号', field: 'id', width: '50',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: "项目编号", field: 'proCode', width: '70'},
                {title: "项目名称", field: 'proName', width: '150'},
                {title: "类型", field: 'malType', width: '90'},
                {title: "部分", field: 'part', width: '150'},
                {title: "物料描述", field: 'malDesc', width: '230'},
                {title: "数量", field: 'num', width: '70'},
                {title: "单位", field: 'unit', width: '70'},
                {title: "型号/标准号", field: 'standard'},
                {title: "品牌", field: 'brand', width: '100'},
                {title: "备注", field: 'remark', width: '150'},
                {title: "提报人", field: 'postName', width: '80'},
                {title: "提报科室", field: 'branchName', width: '100'},
                {title: "提报日期", field: 'createTimeOut', width: '110'}
            ]
        });
    });
</script>
</body>
</html>
